<template>
	<view class="content">
		<view class="panel_box">
			<view class="seach_box">
				<view class="search">
					<view class="icon_search"><uni-icons :type="icons[0].type" color="#333333" :size="icons[0].size" /></view>
					<view class="search_input">
						<input v-model="params.search_data" @input="seachInfo" placeholder-style="font-size:26rpx" placeholder="关键字搜索" value="" />
					</view>
					<view class="icon_search"  ><uni-icons  @click="scanCodeEvent" :type="icons[1].type" color="#333333" :size="icons[1].size" /></view>
				</view>
				<view class="seach_info" @click="seachInfo">搜索</view>
			</view>
		</view>
		
		
		<view class="panel_box">
			<view class="box_title">
				<view class="title_left">状态分类</view>
			</view>
		</view>
		
		<view class="panel_box">
			<view class="scroll_nav">
				<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0">
					<view class="scroll-view-item_H" v-for="(item,index) in deliverStatus" :key="index" v-if="item"  :class="tabSubItem == index ? 'cur' : ''" :data-id="index"  @click="selectTab">
						<view class="scroll-view-title">{{item}}</view>
					</view>
				</scroll-view>
			</view>
		</view>
		
		<view class="panel_box">
			<view class="box_title">
				<view class="title_left">要货确认列表</view>
			</view>
		</view>
		
		<view class="panel_box" v-for="(item,index) in dataList" :key="index" >
			<view class="panel_item">
				
				<uni-collapse>
					<uni-collapse-item :title="'要货单据：'+item.u8_deliver_num" :open="true">
						<view class="box_content">
							<view class="order_list">
								<view class="list_item">
									<!--<view class="item_top">
										<view class="top_left">要货单据：{{item.u8_deliver_num}}</view>-->
										<!--<view class="top_left item_type" v-if="item.inv_code">{{item.inv_code}}</view>-->
										<!--<view class="top_right">{{deliverStatus[item.status]}}</view>
									</view>-->
									<view class="order_list_item" v-for="(i,k) in item.items" :key="k" >
										<view class="product_desc">
											<view class="product_desc_item" v-if="i.inv_name"><text>存货名称：{{i.inv_name}} </text> </view>
											<view class="product_desc_item" v-if="i.inv_code"><text>存货编码：{{i.inv_code}} </text> </view>
											<view class="product_desc_item" v-if="i.address"><text>存货地址：{{i.address}} </text> </view>
											<view class="product_desc_item" v-if="i.specs"><text>规格型号：{{i.specs}}</text> </view>
											<view class="product_desc_item" v-if="i.roll_num"><text>卷数：{{i.roll_num}}</text> </view>
											<view class="product_desc_item" v-if="i.box_num"><text>箱数：{{i.box_num}}</text> </view>
											<view class="product_desc_item" v-if="i.piece_num"><text>装箱数：{{i.piece_num}}</text></view>
											<view class="product_desc_item" v-if="i.inv_add_code"><text>存货代码：{{i.inv_add_code}}</text></view>
											<view class="product_desc_item" v-if="i.mark"><text>备注：{{i.mark}}</text></view>									
										</view>
									</view>
									
								</view>

							</view>
						</view>
						
					</uni-collapse-item>
				</uni-collapse>
				<view class="product_total">
					业务单号：{{item.u8_bus_code}}, 要货时间：{{item.deliver_time}}
				</view>
				
				<view class="product_opt">
				
				
					<!--<view class="button_box" v-if="[1,2].indexOf(item.status)!=-1" >
						<button type="default" size="mini" @click="delDeliver(item.id)">删除要货</button>
					</view>-->
				
					<view class="button_box" v-if="item.status==1">
						<button type="default" size="mini" @click="deliverConfirm(item.id)">确认要货</button>				
					</view>
					
				
					
				</view>
			</view>
		</view>
		
		<view v-if="dataList.length==0" class="empty_box">
			暂无数据
		</view>
		
		
	</view>
</template>


<script>
	import  parentPage from '@/common/parent-page.js';
	import {index} from './index.js';
	export default {mixins: [parentPage,index]}
</script>



<style>
	@import './index.css';
</style>
